<div class="modal-dialog" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button"  class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="exampleModalLabel">审核</h4>
        </div>
        <form class="form-horizontal" style="margin:4%;" id="confirmForm">
            <div class="form-group">
                <label for="recipient-name" class="control-label col-sm-2">备注:</label>
                <div class="col-sm-8">
                    <textarea rows="4" class="form-control" name="description" cols="20"></textarea>
                    <!--<input type="text" class="form-control" name="scope" value="" placeholder="请输入经营范围">-->
                </div>
            </div>
            <div id="check_box" class="form-group">
                <label for="recipient-name" class="control-label col-sm-2">状态:</label>
                <div class="control-label col-sm-3">
                    <input type="checkbox" name="audit" value="1">&nbsp;&nbsp;审核通过
                </div>
                <!--<div class="control-label col-sm-2">
                    <input type="checkbox" name="audit" value="2">不通过
                </div>-->
                <input name="id" type="hidden" value="{$leaseId}">
            </div>
        </form>
        <div class="modal-footer">
            <button type="button"  id="confirm" class="btn btn-primary">确定</button>
            <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>

        </div>
    </div>
</div>

<script>
    $("#confirm").click(function () {
        $.ajax({
            url: "{:U('Admin/Rental/doLeaseConfirm')}",
            type: "post",
            dataType: "json",
            data:$('#confirmForm').serialize(),
            success: function (data) {
                if(data){
                    $("#commonModal").modal('toggle');
                    common.alert("提示","审核成功！!",function(){
                        common.reload();
                    });
                }
            }
        })
    })
    $(function() {
        $("input :checkbox").click(function () {
            if ($(this).attr("checked") == true) {
                $(this).siblings().attr("checked", false);
                $(this).attr("checked", true);
            }
        });
    });



</script>